<!DOCTYPE html>
<html>
  <head>
    <title>JSX whitespace</title>
    <meta charset="utf-8">
  </head>
  <body>
    <div id="app">
      <!-- my app renders here -->
    </div>
    <script src="react/build/react.js"></script>
    <script src="react/build/react-dom.js"></script>
    <script src="babel/browser.js"></script>
    <script type="text/babel">
      ReactDOM.render(
        <h1>
          {/* multi line comment */}
          {/* 
            multi 
            line 
            comment 
            */}
          {
            // single line
          }
          Hello {1} plus {2} is   {3}
          <h2>
            {/* no space */}
            {1}
            plus
            {2}
            is
            {3}
          </h2>
          <h2>
            {/* space expressions */}
            {1}
            {' '}plus{' '}
            {2}
            {' '}is{' '}
            {3}
          </h2>
          <h2>
            {/* space glued to string expressions */}
            {1}
            {' plus '}
            {2}
            {' is '}
            {3}
          </h2>
        </h1>,
        document.getElementById('app')
      );
    </script>
  </body>
</html>